#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
const double EPSILON = 1e-6;
double num[105];

bool cmp(double a,double b){
	double da = fabs(a-round(a));
	double db = fabs(b-round(b));
	if (fabs(da-db)<EPSILON){
		return a<b;
	}else{
		return da<db;
	}
}
int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> num[i];
	}
	sort(num,num+n,cmp);
	for(int i=0;i<n;i++){
		if(i!=n-1){
			printf("%lf ",num[i]);
		}else{
			printf("%lf\n",num[i]);
		}
	}
	return 0;
}
